package com.woniuxy.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Configuration //@Conponent Prefix must be in canonical form
//@ConfigurationProperties(prefix = "my-data-source")
public class MyDataSource {
    @Value("${my-data-source.driver-name}")
    String driverName;
    @Value("${my-data-source.url}")
    String url;
    @Value("${my-data-source.username}")
    String username;
    @Value("${my-data-source.password}")
    String password;
    @Value("${my-data-source.username}")
    String name;
}
